
const multer = require("multer");
const dest = __dirname + "/../public/upload/"
module.exports = app => {
  const controller = require("../controllers/upload.controller.js");
  const upload = multer({ dest: dest });

  const router = require("express").Router();


  router.post("/fileUpload", upload.single('file'),controller.upload);

  app.use('/api/upload', router);
};
